|
This page last changed on Mar 14, 2009 by dcameron.
Then Gendarme task is used to run a static code analysis over your assemblies.
See Using CruiseControl.NET with Gendarme for more details.
Examples
Minimalist Example:
<gendarme>
<assemblies>
<assemblyMatch expr='*.dll' />
<assemblyMatch expr='*.exe' />
</assemblies>
</gendarme>
Full example:
<gendarme>
<executable>Tools\gendarme.exe</executable>
<baseDirectory>C:\Build\Project1\Bin\Debug\</baseDirectory>
<configFile>rules.xml</configFile>
<ruleSet>*</ruleSet>
<ignoreFile>C:\Build\Project1\gendarme.ignore.list.txt</ignoreFile>
<limit>200</limit>
<severity>medium+</severity>
<confidence>normal+</confidence>
<quiet>FALSE</quiet>
<verbose>TRUE</verbose>
<failBuildOnFoundDefects>TRUE</failBuildOnFoundDefects>
<verifyTimeoutSeconds>600</verifyTimeoutSeconds>
<assemblyListFile>C:\Build\Project1\gendarme.assembly.list.txt</assemblyListFile>
<description>Test description</description>
</gendarme>
Configuration Elements:
| Node |
Description |
Type |
Required |
Default |
| executable |
The location of the Gendarme executable |
string |
false |
gendarme.exe |
| baseDirectory |
The directory to run Gendarme in |
string |
false |
Project Working Directory |
| configFile |
Specify the configuration file |
string |
false |
Default is 'rules.xml' |
| ruleSet |
Specify the set of rules to verify |
string |
false |
Default is '*' |
| ignoreFile |
Do not report the known defects that are part of the specified file |
string |
false |
|
| limit |
Stop reporting after N defects are found |
int |
false |
|
| severity |
Filter the reported defects to include the specified severity levels |
string |
false |
Default is 'medium+' (i.e. low and audit levels are ignored) |
| confidence |
Filter the reported defects to include the specified confidence levels. |
string |
false |
Default is 'normal+' (i.e. low level is ignored) |
| quiet |
If true, display minimal output (results) from the runner. |
bool |
false |
false |
| verbose |
Enable debugging output. |
bool |
false |
false |
| failBuildOnFoundDefects |
Specify whenver the build should fail if some defects are found by Gendarme. |
bool |
false |
false |
| assemblies |
A set of <assemblyMatch> elements that define what assemblies to analyse. |
complex |
false |
|
| assemblyListFile |
Specify a file that contains the assemblies to verify. You can specify multiple filenames, including masks (? and *), one by line. |
string |
false |
|
| verifyTimeoutSeconds |
Gets and sets the maximum number of seconds that the build may take. If the build process takes longer than this period, it will be killed. Specify this value as zero to disable process timeouts. |
int |
false |
0 (disabled) |
| description |
If filled in, this will be shown in the buildstage as the process name |
string |
false |
|
AssemblyMatch Configuration Element:
| Node |
Description |
Type |
Required |
| expr |
The name expression of the Assembly, including masks (? and *). |
string |
true |
Example:
<assemblies>
<assemblyMatch expr='*.dll' />
<assemblyMatch expr='*.exe' />
</assemblies>
|